import axios from '@/libs/request/axios'
// 获取任务列表
export const queryApproveTaskList = (params) => {
    return axios.request({
        url: `/case/approve/queryApproveTaskList`,
        params: params,
        method: 'post'
    })
}

// 审批暂存
export const saveApprove = (params) => {
    return axios.request({
        url: `/case/approve/saveApprove`,
        data: params,
        method: 'post'
    })
}

// 审批提交
export const submitApprove = (params) => {
    return axios.request({
        url: `/case/approve/submitApprove`,
        data: params,
        method: 'post'
    })
}

export const queryApprove = (params) => {
    return axios.request({
        url: `/case/approve/queryApprove`,
        params: params,
        method: 'get'
    })
}

export const querySomeApprove = (params) => {
    return axios.request({
        url: `/case/approve/querySomeApprove`,
        params: params,
        method: 'get'
    })
}

export const testWorkflow = (params) => {
    return axios.request({
        url: `/case/approve/testWorkflow`,
        params: params,
        method: 'get'
    })
}
export const setStatusIsOpen = (params) => {
    return axios.request({
        url: `/case/approve/setStatusIsOpen`,
        params: params,
        method: 'post'
    })
}

export const listTaskHandler = (params) =>{
    return axios.request({
        url: `/case/approve/listTaskHandler`,
        params: params,
        method: 'get'
    })
}

export const changeTaskHandler = (params) =>{
    return axios.request({
        url: `/case/approve/taskHandler`,
        data: params,
        method: 'post'
    })
}

export const cancelFlow = (params) =>{
    return axios.request({
        url: `/case/approve/cancelFlow`,
        data: params,
        method: 'post'
    })
}

export const appointFlow = (params) =>{
    return axios.request({
        url: `/case/approve/appointFlow`,
        data: params,
        method: 'post'
    })
}

export const dayBookResolve = (params) =>{
    return axios.request({
        url: `/case/approve/dayBookResolve`,
        params: params,
        method: 'get'
    })
}

export const getIsOpenByStageId = (stageId, params) => {
    return axios.request({
        url: `/case/approve/getIsOpenByStageId/${stageId}`,
        params: params,
        method: 'get'
    })
}

export const callBackFlow = (params) =>{
    return axios.request({
        url: `/case/approve/callBackFlow`,
        data: params,
        method: 'post'
    })
}

export const getFlowCmd = (params) => {
    return axios.request({
        url: `/case/approve/getFlowCmd`,
        params:params,
        method:"get"
    });
}



